#include <iostream>

using namespace std;

int main(void)
{
    for (int num = 1; num < 101; num ++)
    {
        if((num % 7 == 0) || (num % 10 == 7) || (num / 10 == 7))
        {
            cout << num << endl;
        }
    }

        return 0;
}